message queue
GraphicsDesigner combines message arguments into a message and adds it to its message queue. Messages wait in the message queue until your program is ready to process them.

In summary, GraphicsDesigner detects events, makes messages to describe them, and puts them in the message queue - automatically and invisibly, without the knowledge or support of your programs.

process message
This is where your program takes over. Your programs must process the messages GraphicsDesigner put in the message queue. Otherwise the messages will sit in the queue forever and your programs will be permanently dead and lifeless. Processing messages animates and gives life to your GUI programs. In short, processing messages is how GUI programs run themselves.

XgrProcessMessages()
Programs call XgrProcessMessages(1) to process a message. XgrProcessMessages() processes messages in the order they were added to the queue. First come, first served. Or in computer lingo, First-In, First-Out ... or FIFO.

The basic operation of GUI programs is almost unbelievably simple. Process a message completely. Then process the next one. Then the next, then the next, then the next... indefinitely. That's all there is!

Processing each GraphicsDesigner message is reacting to a keystroke, button click, or other user action. Processing messages is nothing more than obeying a series of user instructions, one by one. If it sounds like the user controls your program, you're right! It's the reason most people prefer GUI programs - they like to run the show.

Actually it's just a variety of the grand illusion. Users can only select from choices your program gives them. They're playing your game. But you don't have to tell them that, and they'll never catch on. People are conditioned not to recognize the grand scam.